package com.dxy.multids.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.dxy.multids.mapper.TaskInfoMapper;
import com.dxy.multids.mapper.UserInfoMapper;
import com.dxy.multids.pojo.UserInfo;
import com.dxy.multids.service.UserInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.Map;

@Service
public class UserInfoServiceImpl extends ServiceImpl<UserInfoMapper, UserInfo> implements UserInfoService {

    @Autowired
    private UserInfoMapper userInfoMapper;

    @Autowired
    private TaskInfoMapper taskInfoMapper;

    @Override
    public Map<String, Object> getUserAndTask(Long userId, Long taskId) {
        Map<String, Object> map = new HashMap<>();
        map.put("user", userInfoMapper.selectById(userId));// dxy2数据源
        map.put("task", taskInfoMapper.selectById(taskId));// tq数据源
        return map;
    }
}
